apiVersion: v1
kind: Pod
metadata:
  name: kube-vip
  namespace: kube-system
spec:
  containers:
    - name: kube-vip
      image: ghcr.io/kube-vip/kube-vip:v0.6.4
      args:
        - manager
      env:
        - name: address
          value: {{ control_plane_endpoint }}
        - name: vip_arp
          value: "true"
        - name: cp_enable
          value: "true"
        - name: vip_leaderelection
          value: "true"
        - name: lb_enable
          value: "true"
      securityContext:
        capabilities:
          add:
            - NET_ADMIN
            - NET_RAW
      volumeMounts:
        - mountPath: /etc/kubernetes/admin.conf
          name: kubeconfig
  hostAliases:
    - hostnames:
        - kubernetes
      ip: 127.0.0.1
  hostNetwork: true
  volumes:
    - hostPath:
        path: {{ k3s_kubeconfig_file }}
      name: kubeconfig
